package com.cathyjava.crawl.entity;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.sql.Date;

/**
 * @author chenjing
 * @date 2021/4/20
 */
@Entity
@Table(name = "permission_security.system_menu", schema = "root")
@DynamicInsert
@DynamicUpdate
public class SystemMenu implements Serializable {

    private static final long serialVersionUID = 5421757630121636006L;

    /**
     * 复合主键要用这个注解
     */
    @EmbeddedId
    private MenuKey key;


    /**
     * 父ID
     */
    @Column(name = "pid")
    private Long pid;


    /**
     * 菜单图标
     */
    @Column(name = "icon")
    private String icon;

    /**
     * 链接打开方式
     */
    @Column(name = "target", columnDefinition = "_self")
    private String target;
    /**
     * 菜单排序
     */
    @Column(name = "sort")
    private Long sort;

    /**
     * 状态(0:禁用,1:启用)
     */
    @Column(name = "status", columnDefinition = "tinyint DEFAULT 1")
    private Integer status;

    /**
     * 备注信息
     */
    @Column(name = "remark")
    private String remark;

    /**
     * 创建时间
     */
    @Column(name = "create_at")
    private Date createAt;

    /**
     * 更新时间
     */
    @Column(name = "update_at")
    private Date updateAt;

    /**
     * 删除时间
     */
    @Column(name = "delete_at")
    private Date deleteAt;

/*    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }*/

    public Long getPid() {
        return this.pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }


    public String getIcon() {
        return this.icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }


    public String getTarget() {
        return this.target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    public Long getSort() {
        return this.sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Integer getStatus() {
        return this.status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return this.remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateAt() {
        return this.createAt;
    }

    public void setCreateAt(Date createAt) {
        this.createAt = createAt;
    }

    public Date getUpdateAt() {
        return this.updateAt;
    }

    public void setUpdateAt(Date updateAt) {
        this.updateAt = updateAt;
    }

    public Date getDeleteAt() {
        return this.deleteAt;
    }

    public void setDeleteAt(Date deleteAt) {
        this.deleteAt = deleteAt;
    }

    public MenuKey getKey() {
        return key;
    }

    public void setKey(MenuKey key) {
        this.key = key;
    }

}
